<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>1-键盘事件</title>
	</head>
	<body>
		<script type="text/javascript">
			//onkeyup 键盘按下抬起
			document.addEventListener('keyup',function(e){
				//e事件对象
				console.log('按了键盘某个键抬起...');
			});
			//键盘按键被按下
			document.addEventListener('keydown',function(e){
				//e事件对象
				console.log('按了键盘某个键...');
			});
			document.addEventListener('keypress',function(e){
				//e事件对象
				console.log('按了键盘某个键Q...');
			});
		</script>
	</body>
</html>
